home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3177 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.3 KB

  1. Path: urals.jpl.nasa.gov!user
  2. From: mlj@tazboy.jpl.nasa.gov (Mose L. Johnson)
  3. Newsgroups: comp.lang.c++
  4. Subject: Unresolved Templates during link time in Borderland 4.5
  5. Date: Mon, 22 Jan 1996 08:38:18 -0800
  6. Organization: Jet Propulsion Laboratory
  7. Message-ID: <mlj-2201960838180001@urals.jpl.nasa.gov>
  8. NNTP-Posting-Host: urals.jpl.nasa.gov
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=US-ASCII
  11. Content-Transfer-Encoding: 7bit
  12.  
  13. I am posting this question for another usenet user who is unable to post. 
  14. He can be e-mailed at:
  15.  
  16. nigel5@pcman.demon.co.uk
  17.  
  18.  
  19. I noticed in your articles that you were using templates. I do not know
  20. how to post articles up to a group yet, so I thought I would E-Mail you,
  21. I hope you don't mind...
  22.  
  23. Teplates (the noddy version...)
  24.  
  25. I am using Borland C++ 4.5 at home, and some Irix-Silicon Grafix thing
  26. at work, and I want to write some basic templates. I know Borland has a
  27. whole load, but I am learning and want to play at my own)
  28.  
  29. I have created a basic list template class. LList<T>::...
  30.  
  31. I have typedef'ed an int version, that I have included in the llist.h
  32. file. I want to create, say a float list... 
  33.  
  34. typedef LList<float> FloatList;
  35.  
  36. in my main.cpp
  37.  
  38. When I compile it.. no probs. when Borland links it there are linker
  39. errors saying that LList<float>::LList<float>() is un resolved.
  40.  
  41. I have found the option that allows the code to compile.. (teplates are
  42. global!) and as long as I tell the template code there is to be an <X>
  43. version there is no problem, but that means I can't compile my LList
  44. into an object to link into anything.
  45.  
  46. The irix compileer at work has a pre-compile where it picks up all of my
  47. template casts.
  48.  
  49. Any help would be very much appreciated.
  50. Thanx
  51. Nigel. (Johnson.. I just realized.!!)
  52.              @@@@@@@    @@@@@@@  @@@@@@@@@@    @@@@@@   @@@  @@@
  53.              @@!  @@@  !@@       @@! @@! @@!  @@!  @@@  @@!@!@@@
  54.              @!@@!@!   !@!       @!! !!@ @!@  @!@!@!@!  @!@@!!@!
  55.              !!:       :!!       !!:     !!:  !!:  !!!  !!:  !!!
  56.               :         :: :: :   :      :     :   : :  ::    : 
  57.                                                                
  58.  --------------------------------------------------------------------------
  59. |       Iluminating the world with nether regional photonic amplitude      |
  60.  --------------------------------------------------------------------------
  61.